django template {context}

lass DetailArticleView(DetailView):
    model = Article
    template_name = "blog/detail_article.html"

    def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
        """let's override this method to add more template context 'liked_by_user'"""
        context = super(DetailArticleView, self).get_context_data(**kwargs)
        article = Article.objects.get(id=self.kwargs.get("pk"))

        context["liked_by_user"] = False

        if article.likes.filter(pk=self.request.user.id).exists():
            context["liked_by_user"] = True

        return context